﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <script type="text/javascript" language="javascript">
        (function foo(inputA, inputB) {
            var argsLenDef = foo.length;
            var argsDef = "";
            for (j = 0; j < argsLenDef; j++) {
                argsDef += foo[j] + ";";
            }
            var argsLenReal = arguments.length;
            var argsReal = "";
            for (i = 0; i < argsLenReal; i++) {
                argsReal += arguments[i] + ";";
            }
            alert("实际上本函数定义了" + argsLenDef + "个参数;但是总共给函数传入了" + argsLenReal + "个参数;传入的参数分别为" + argsReal + "其中参数" + argsDef + "将会被函数使用,其他参数将会被抛弃");
        })("a", "b", "c");
    </script>

</head>
<body>
</body>
</html>
